<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/
$router->get('/', function () use ($router) {
    return 'youhuohuo';
//    abort(403);
    //return $app->version();
});


//货物
$router->post('goods/release', 'GoodsController@releaseGoods');
$router->post('goods/del', 'GoodsController@delGoods');
$router->post('goods/report', 'GoodsController@reportGoods');
$router->post('goods/comment', 'GoodsController@commentGoods');
$router->post('goods/keylist', 'GoodsController@keylistGoods');
$router->post('goods/list', 'GoodsController@listGoods');
$router->post('goods/info', 'GoodsController@infoGoods');

//杂货
$router->post('sundry/category', 'SundryController@category');
$router->post('sundry/address', 'SundryController@address');
$router->post('sundry/decrypt', 'SundryController@decrypt');
$router->post('sundry/style', 'SundryController@picStyle');
$router->post('sundry/form', 'SundryController@addFormId');
//图片上传
$router->post('sundry/upload', 'SundryController@upload');
//消息
$router->post('message/list', 'MessageController@listMessage');
$router->post('message/count', 'MessageController@countMessage');
$router->post('message/del', 'MessageController@delMessage');
$router->post('message/read', 'MessageController@readMessage');

//user
$router->post('user/info', 'UserController@infoUser');
$router->post('user/save', 'UserController@saveUser');
$router->post('user/search', 'UserController@searchUser');
$router->post('user/list', 'UserController@listUser');
$router->post('user/apply', 'UserController@applyListUser');
$router->post('user/add', 'UserController@addUser');
$router->post('user/del', 'UserController@delUser');
$router->post('user/agree', 'UserController@agreeAddUser');
$router->post('user/diamond', 'UserController@diamondList');
$router->post('user/fnum', 'UserController@applyNum');
$router->post('user/fnote', 'UserController@friendNote');
//login
$router->post('login/login', 'LoginController@login');

//脚本每晚更新当前用户第二天登录所得
$router->get('script/updateLogin', 'ScriptController@updateLogin');